package com.example.service;

import com.example.entity.BuildingModel;
import com.example.entity.Count;
import com.example.entity.Household;
import com.example.entity.Page.PageRequest;
import com.example.entity.Page.PageResult;
import com.example.result.CommonResult;

import java.util.List;

/**
 * @project: smart-property
 * @description: 住户管理 service 层
 * @author: cjq
 * @create: 2022-11-21 13:53
 **/
public interface HouseholdService {
    /**
     * 房屋联级查询
     * @param cid
     * @return
     */
    List<BuildingModel> listHouse(Integer cid);

    /**
     * 住户编号查重
     * @param hNumber
     * @param villageId
     * @return
     */
    CommonResult listHnumber(String hNumber, Integer villageId);

    /**
     * 添加/修改住户信息
     * @param household
     * @return
     */
    int saveHouseHold(Household household);

    /**
     * 住户列表展示
     * @param householdType
     * @param start
     * @param type
     * @param input
     * @param house
     * @param villageId
     * @param startTime
     * @param endTime
     * @param pageRequest
     * @return
     */
    PageResult queryHouseHold(String householdType, Integer start,String type,String input,String startTime, String endTime,String house, Integer villageId ,PageRequest pageRequest);

    /**
     * 审核住户
     * @param id
     * @param examineMessage
     * @param start
     * @return
     */
    int examineStart(Integer id, String examineMessage, Integer start);

    /**
     * 删除住户信息
     * @param id
     * @return
     */
    int delHouseHold(Integer id);

    /**
     * 批量删除住户信息
     * @param ids
     * @return
     */
    int batchDel(Integer[] ids);

    /**
     * 住户统计
     * @param villageId
     * @return
     */
    Count countHouseHoid(Integer villageId);
}
